<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- SEO 基础优化 -->
    <title>免费AI模型API调用平台 - LMArena | 140+免费模型接口 | Claude/GPT/Gemini免费API</title>
    <meta name="description"
        content="LMArena提供140+免费AI模型API调用服务，支持Claude、GPT-5、Gemini、DeepSeek等顶级模型免费调用。统一OpenAI标准接口，零成本访问所有AI模型，一键接入各种AI客户端，支持文本生成、图像生成等多模态API调用。">
    <meta name="keywords"
        content="免费AI模型API,免费模型API调用,免费GPT API,免费Claude API,免费AI接口,LMArena,AI模型免费调用,OpenAI API免费,Gemini免费API,DeepSeek免费接口,AI模型统一接口,免费大模型API">
    <meta name="author" content="LMArena">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://www.lmarena.ai/">

    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://www.lmarena.ai/">
    <meta property="og:title" content="免费AI模型API调用平台 - 140+顶级模型免费使用">
    <meta property="og:description" content="零成本访问Claude、GPT-5、Gemini等140+AI模型，统一OpenAI标准接口，支持所有主流AI客户端">
    <meta property="og:image" content="https://www.lmarena.ai/og-image.png">

    <!-- Twitter Card -->
    <meta property="twitter:card" content="summary_large_image">
    <meta property="twitter:url" content="https://www.lmarena.ai/">
    <meta property="twitter:title" content="免费AI模型API调用平台 - LMArena">
    <meta property="twitter:description" content="140+免费AI模型API调用，支持Claude、GPT、Gemini等顶级模型">
    <meta property="twitter:image" content="https://www.lmarena.ai/twitter-card.png">

    <!-- 结构化数据 Schema.org -->
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "SoftwareApplication",
        "name": "LMArena - 免费AI模型API调用平台",
        "description": "提供140+免费AI模型API调用服务，支持Claude、GPT、Gemini等顶级模型免费调用",
        "applicationCategory": "DeveloperApplication",
        "operatingSystem": "Windows, macOS, Linux",
        "offers": {
            "@type": "Offer",
            "price": "0",
            "priceCurrency": "CNY"
        },
        "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "4.9",
            "reviewCount": "1280"
        },
        "featureList": [
            "140+免费AI模型API调用",
            "统一OpenAI标准接口",
            "支持Claude/GPT/Gemini免费调用",
            "文本生成API",
            "图像生成API",
            "多模态API支持"
        ]
    }
    </script>

    <style>
        /* 基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f8f9fa;
            padding-top: 60px;
        }

        /* 顶部进度条 */
        .progress-bar {
            position: fixed;
            top: 0;
            left: 0;
            width: 0%;
            height: 3px;
            background: linear-gradient(90deg, #007bff, #0056b3);
            z-index: 10000;
            transition: width 0.3s ease;
        }

        /* 顶部导航栏 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 60px;
            background: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            display: flex;
            align-items: center;
            padding: 0 20px;
        }

        .top-nav h1 {
            font-size: 1.5em;
            margin: 0;
            flex: 1;
        }

        .quick-actions {
            display: flex;
            gap: 15px;
        }

        .quick-actions button {
            padding: 8px 16px;
            border: 1px solid #007bff;
            background: #fff;
            color: #007bff;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .quick-actions button:hover {
            background: #007bff;
            color: #fff;
        }

        /* 主内容区域 */
        .main-wrapper {
            display: flex;
            max-width: 1400px;
            margin: 0 auto;
            gap: 30px;
            padding: 20px;
        }

        /* 侧边栏目录 */
        .sidebar {
            position: sticky;
            top: 80px;
            width: 280px;
            height: calc(100vh - 100px);
            overflow-y: auto;
            background: #fff;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .sidebar h3 {
            font-size: 1.1em;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #007bff;
        }

        .toc-item {
            padding: 8px 0;
            cursor: pointer;
            transition: all 0.3s;
            border-left: 3px solid transparent;
            padding-left: 10px;
        }

        .toc-item:hover {
            color: #007bff;
            background: #f0f8ff;
            border-left-color: #007bff;
        }

        .toc-item.active {
            color: #007bff;
            font-weight: 600;
            background: #f0f8ff;
            border-left-color: #007bff;
        }

        .toc-item.level-2 {
            padding-left: 25px;
            font-size: 0.95em;
        }

        .toc-item.level-3 {
            padding-left: 40px;
            font-size: 0.9em;
        }

        /* 主内容 */
        .content {
            flex: 1;
            background: #fff;
            border-radius: 8px;
            padding: 30px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        /* 标题样式 */
        h1,
        h2,
        h3,
        h4 {
            font-weight: 600;
            color: #000;
            margin-top: 1.5em;
            margin-bottom: 0.5em;
        }

        h2 {
            font-size: 1.8em;
            border-bottom: 2px solid #007bff;
            padding-bottom: 0.3em;
        }

        h3 {
            font-size: 1.4em;
            border-bottom: 1px solid #dee2e6;
            padding-bottom: 0.3em;
        }

        h4 {
            font-size: 1.2em;
        }

        /* 代码样式 */
        code {
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
            background-color: #e9ecef;
            padding: 0.2em 0.4em;
            font-size: 90%;
            border-radius: 3px;
        }

        .code-block-wrapper {
            position: relative;
            margin: 15px 0;
        }

        .copy-button {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 5px 10px;
            background: #007bff;
            color: #fff;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            font-size: 12px;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .code-block-wrapper:hover .copy-button {
            opacity: 1;
        }

        .copy-button:hover {
            background: #0056b3;
        }

        .copy-button.copied {
            background: #28a745;
        }

        pre {
            background-color: #212529;
            color: #f8f9fa;
            padding: 1em;
            border-radius: 5px;
            overflow-x: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        pre code {
            background-color: transparent;
            padding: 0;
            color: inherit;
        }

        /* 模型列表样式 */
        .model-search-box {
            margin: 20px 0;
            position: relative;
        }

        .model-search-box input {
            width: 100%;
            padding: 12px 40px 12px 15px;
            border: 2px solid #dee2e6;
            border-radius: 5px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        .model-search-box input:focus {
            outline: none;
            border-color: #007bff;
        }

        .search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #6c757d;
        }

        .model-categories {
            margin: 20px 0;
        }

        .model-category {
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            overflow: hidden;
        }

        .category-header {
            padding: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s;
        }

        .category-header:hover {
            transform: translateX(5px);
        }

        .category-header h4 {
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .model-count {
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.9em;
        }

        .toggle-icon {
            transition: transform 0.3s;
        }

        .model-category.collapsed .toggle-icon {
            transform: rotate(-90deg);
        }

        .model-list {
            display: none;
            padding: 15px;
            background: #f8f9fa;
        }

        .model-category.expanded .model-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 10px;
        }

        .model-item {
            padding: 8px 12px;
            background: #fff;
            border-radius: 5px;
            border-left: 3px solid #007bff;
            transition: all 0.3s;
        }

        .model-item:hover {
            transform: translateX(5px);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .model-item.hot {
            border-left-color: #ff6b6b;
            background: #fff5f5;
        }

        .model-item.new {
            border-left-color: #28a745;
            background: #f0fff4;
        }

        /* 图片样式 */
        img {
            max-width: 100%;
            height: auto;
            border-radius: 5px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            margin: 1em 0;
            cursor: pointer;
            transition: transform 0.3s;
        }

        img:hover {
            transform: scale(1.02);
        }

        /* 图片查看器 */
        .image-viewer {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            z-index: 2000;
            cursor: pointer;
        }

        .image-viewer img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 90%;
            max-height: 90%;
            box-shadow: none;
        }

        .image-viewer.active {
            display: block;
        }

        /* 提示框样式 */
        .note {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
            position: relative;
            overflow: hidden;
        }

        .note::before {
            content: '💡';
            position: absolute;
            top: -20px;
            right: -20px;
            font-size: 100px;
            opacity: 0.1;
        }

        .warning {
            color: #fff;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            padding: 15px 20px;
            border-radius: 5px;
            font-weight: bold;
            margin: 15px 0;
        }

        .highlight {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
            color: #000;
            padding: 2px 8px;
            border-radius: 3px;
            font-weight: 600;
        }

        /* 快速开始卡片 */
        .quick-start {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            padding: 30px;
            border-radius: 10px;
            margin: 30px 0;
            text-align: center;
        }

        .quick-start h2 {
            color: #fff;
            border: none;
            margin-top: 0;
        }

        .download-button {
            display: inline-block;
            padding: 15px 40px;
            background: #fff;
            color: #667eea;
            text-decoration: none;
            border-radius: 50px;
            font-size: 1.2em;
            font-weight: 600;
            margin-top: 20px;
            transition: all 0.3s;
        }

        .download-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        /* FAQ样式 */
        .faq-item {
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            overflow: hidden;
        }

        .faq-question {
            padding: 15px;
            background: #f8f9fa;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background 0.3s;
        }

        .faq-question:hover {
            background: #e9ecef;
        }

        .faq-answer {
            padding: 0 15px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
        }

        .faq-item.active .faq-answer {
            padding: 15px;
            max-height: 500px;
        }

        /* 回到顶部按钮 */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: all 0.3s;
            z-index: 999;
        }

        .back-to-top:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .back-to-top.show {
            display: flex;
        }

        /* 响应式设计 */
        @media (max-width: 1024px) {
            .main-wrapper {
                flex-direction: column;
            }

            .sidebar {
                position: static;
                width: 100%;
                height: auto;
                margin-bottom: 20px;
            }
        }

        @media (max-width: 768px) {
            .top-nav h1 {
                font-size: 1.2em;
            }

            .quick-actions {
                display: none;
            }

            .model-category.expanded .model-list {
                grid-template-columns: 1fr;
            }

            .content {
                padding: 20px;
            }

            h2 {
                font-size: 1.5em;
            }

            h3 {
                font-size: 1.2em;
            }
        }

        /* 加载动画 */
        @keyframes pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }

            100% {
                opacity: 1;
            }
        }

        .loading {
            animation: pulse 1.5s infinite;
        }
    </style>
</head>

<body>
    <!-- 页面进度条 -->
    <div class="progress-bar" id="progressBar"></div>

    <!-- 顶部导航 -->
    <header class="top-nav">
        <h1>🚀 LMArena - 免费AI模型API调用平台</h1>
        <nav class="quick-actions">
            <button onclick="location.href='#quick-start'">快速开始</button>
            <button onclick="location.href='#download'">立即下载</button>
        </nav>
    </header>

    <div class="main-wrapper">
        <!-- 侧边栏目录 -->
        <aside class="sidebar">
            <h3>📑 目录导航</h3>
            <div id="toc">
                <div class="toc-item level-1" data-target="introduction">📖 工具介绍</div>
                <div class="toc-item level-2" data-target="intro">📋 产品简介</div>
                <div class="toc-item level-2" data-target="models">✨ 支持模型</div>
                <div class="toc-item level-2" data-target="showcase">🎯 客户端展示</div>
                <div class="toc-item level-2" data-target="problems">💡 解决的问题</div>
                <div class="toc-item level-2" data-target="features">🚀 核心功能</div>
                <div class="toc-item level-2" data-target="scenarios">📌 使用场景</div>
                <div class="toc-item level-2" data-target="advantages">🏆 独特优势</div>
                <div class="toc-item level-1" data-target="installation">🛠 安装指南</div>
                <div class="toc-item level-2" data-target="download">📥 项目下载</div>
                <div class="toc-item level-2" data-target="env-setup">⚙️ 环境配置</div>
                <div class="toc-item level-2" data-target="service">🖥 服务启动</div>
                <div class="toc-item level-2" data-target="client-config">📱 客户端配置</div>
                <div class="toc-item level-2" data-target="api">🔌 API调用</div>
                <div class="toc-item level-1" data-target="faq">❓ 常见问题</div>
                <div class="toc-item level-1" data-target="support">📞 技术支持</div>
            </div>
        </aside>

        <!-- 主内容区 -->
        <main class="content">
            <!-- 快速开始卡片 -->
            <section class="quick-start" id="quick-start">
                <h2>🎯 免费AI模型API调用 - 5分钟快速接入</h2>
                <p style="font-size: 1.2em; margin: 20px 0;"><strong>一个接口，免费调用 140+ AI 模型API</strong></p>
                <p>零成本使用 Claude、GPT-5、Gemini、DeepSeek 等顶级模型API</p>
                <a href="https://pan.baidu.com/s/16lXXX2G7KKZeSn4Y_e1d8g?pwd=ntam" class="download-button"
                    title="下载免费AI模型API调用工具">
                    立即免费下载
                </a>
            </section>

            <main id="introduction">
                <h2 id="intro">📖 免费AI模型API调用工具 - LMArena Bridge</h2>

                <h3>📋 什么是免费模型API调用平台？</h3>
                <p>LMArena是一个革命性的<strong>免费AI模型API调用平台</strong>，它将<a href="https://lmarena.ai/" target="_blank"
                        rel="nofollow"> LMArena</a>（大型语言模型竞技场）转换为标准的
                    OpenAI API 兼容接口。通过这个<strong>免费模型API调用工具</strong>，开发者可以零成本使用任何支持 OpenAI API 的客户端来免费调用 140+
                    顶级AI模型，包括Claude、GPT-5、Gemini等，真正实现了"<strong>一个接口，免费调用所有AI模型API</strong>"的承诺。</p>

                <div class="note">
                    <strong>🎉 免费AI模型API调用核心优势</strong><br>
                    • <strong>完全免费</strong>：零成本调用Claude、GPT、Gemini等顶级AI模型API<br>
                    • <strong>统一接口</strong>：OpenAI标准API，一套代码免费调用所有模型<br>
                    • <strong>数据安全</strong>：本地化部署，API调用数据不经过第三方<br>
                    • <strong>持续更新</strong>：实时更新最新免费模型API接口
                </div>

                <h3 id="models">✨ 140+免费AI模型API列表</h3>

                <div class="warning">
                    🎁 <strong>所有AI模型API完全免费调用！无需付费即可使用顶级模型</strong>
                </div>

                <!-- 模型搜索框 -->
                <div class="model-search-box">
                    <input type="text" id="modelSearch" placeholder="搜索免费AI模型API..." onkeyup="searchModels()"
                        aria-label="搜索免费模型API">
                    <span class="search-icon">🔍</span>
                </div>

                <!-- 模型分类展示 -->
                <div class="model-categories">
                    <!-- OpenAI 模型 -->
                    <div class="model-category expanded">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🤖 OpenAI <span class="model-count">20+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item hot">gpt-5-chat</div>
                            <div class="model-item hot">gpt-5-high</div>
                            <div class="model-item hot">gpt-5-mini-high</div>
                            <div class="model-item new">o3-2025-04-16</div>
                            <div class="model-item new">o3-mini</div>
                            <div class="model-item">chatgpt-4o-latest-20250326</div>
                            <div class="model-item">gpt-4.1-2025-04-14</div>
                            <div class="model-item">dall-e-3</div>
                            <div class="model-item">sora</div>
                            <div class="model-item">gpt-image-1</div>
                        </div>
                    </div>

                    <!-- Google 模型 -->
                    <div class="model-category collapsed">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🌐 Google <span class="model-count">15+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item hot">gemini-2.5-pro</div>
                            <div class="model-item hot">gemini-2.5-flash</div>
                            <div class="model-item new">gemini-2.0-flash-001</div>
                            <div class="model-item">imagen-4.0-generate-preview-06-06</div>
                            <div class="model-item">veo3</div>
                            <div class="model-item">veo3-fast</div>
                            <div class="model-item">veo2</div>
                            <div class="model-item">gemma-3-27b-it</div>
                        </div>
                    </div>

                    <!-- Anthropic 模型 -->
                    <div class="model-category collapsed">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🧠 Anthropic <span class="model-count">12+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item hot">claude-opus-4-20250514</div>
                            <div class="model-item hot">claude-sonnet-4-20250514</div>
                            <div class="model-item new">claude-3-7-sonnet-20250219</div>
                            <div class="model-item">claude-3-5-sonnet-20241022</div>
                            <div class="model-item">claude-3-5-haiku-20241022</div>
                        </div>
                    </div>

                    <!-- DeepSeek 模型 -->
                    <div class="model-category collapsed">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🔍 DeepSeek <span class="model-count">3+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item hot">deepseek-v3.1-terminus</div>
                            <div class="model-item new">deepseek-v3.1-terminus-thinking</div>
                            <div class="model-item">deepseek-v3-0324</div>
                        </div>
                    </div>

                    <!-- 阿里巴巴模型 -->
                    <div class="model-category collapsed">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🐯 Alibaba <span class="model-count">15+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item hot">qwen3-max-preview</div>
                            <div class="model-item hot">qwen3-235b-a22b</div>
                            <div class="model-item new">qwen3-coder-480b-a35b-instruct</div>
                            <div class="model-item">qwq-32b</div>
                            <div class="model-item">qwen-vl-max-2025-08-13</div>
                        </div>
                    </div>

                    <!-- 其他模型 -->
                    <div class="model-category collapsed">
                        <div class="category-header" onclick="toggleCategory(this)">
                            <h4>🌟 其他热门模型 <span class="model-count">80+</span></h4>
                            <span class="toggle-icon">▼</span>
                        </div>
                        <div class="model-list">
                            <div class="model-item">grok-4-0709 (xAI)</div>
                            <div class="model-item">llama-4-scout-17b-16e-instruct (Meta)</div>
                            <div class="model-item">mistral-medium-2505 (Mistral)</div>
                            <div class="model-item">kimi-k2-0905-preview (Moonshot)</div>
                            <div class="model-item">mai-1-preview (Microsoft)</div>
                            <div class="model-item">flux-1-kontext-pro (BFL)</div>
                            <div class="model-item">glm-4.5 (智谱AI)</div>
                            <div class="model-item">更多模型...</div>
                        </div>
                    </div>
                </div>

                <h3 id="showcase">😆 免费AI模型API客户端调用示例</h3>

                <h4>Cherry Studio - 免费调用Claude/GPT API</h4>
                <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1760764717105-bfef1e5b-93dc-4a1c-a142-1fb9ea74577c.png"
                    alt="Cherry Studio免费调用AI模型API配置示例" onclick="openImageViewer(this)">

                <h4>Cline - VS Code免费AI编程API</h4>
                <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1760764750536-6f30d003-52c8-4232-bea4-e0bfe8b6354f.png"
                    alt="Cline免费AI模型API调用配置" onclick="openImageViewer(this)">

                <h3 id="problems">🎯 免费模型API调用解决的痛点</h3>

                <div
                    style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 20px 0;">
                    <div
                        style="padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 10px;">
                        <h4 style="margin-top: 0;">1. API费用高昂</h4>
                        <p>提供完全免费的AI模型API调用，节省数万元API成本</p>
                    </div>
                    <div
                        style="padding: 20px; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; border-radius: 10px;">
                        <h4 style="margin-top: 0;">2. 多模型管理复杂</h4>
                        <p>一个免费API接口调用140+模型，无需管理多个收费API</p>
                    </div>
                    <div
                        style="padding: 20px; background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; border-radius: 10px;">
                        <h4 style="margin-top: 0;">3. 会话管理</h4>
                        <p>自动化会话ID管理，简化操作流程</p>
                    </div>
                    <div
                        style="padding: 20px; background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); color: white; border-radius: 10px;">
                        <h4 style="margin-top: 0;">4. 批量处理</h4>
                        <p>支持批量请求和自动化调用，提升效率</p>
                    </div>
                </div>

                <h3 id="features">🚀 免费AI模型API调用功能特性</h3>
                <ul style="line-height: 2;">
                    <li>✅ <strong>100%免费API调用</strong> - 所有模型API完全免费，无任何隐藏费用</li>
                    <li>✅ <strong>OpenAI标准兼容</strong> - 支持所有OpenAI API客户端免费调用</li>
                    <li>✅ <strong>140+免费模型</strong> - 免费使用Claude、GPT-5、Gemini等顶级模型API</li>
                    <li>✅ <strong>多模态免费API</strong> - 文本、图像、视频生成API全部免费</li>
                    <li>✅ <strong>零配置接入</strong> - 5分钟完成免费API接入配置</li>
                </ul>

                <h3 id="scenarios">💡 典型使用场景</h3>
                <div
                    style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin: 20px 0;">
                    <div style="padding: 15px; border: 2px solid #007bff; border-radius: 8px;">
                        <h4 style="margin-top: 0; color: #007bff;">👨‍💻 开发者</h4>
                        <ul style="margin: 0; padding-left: 20px;">
                            <li>IDE集成AI助手</li>
                            <li>构建AI应用</li>
                            <li>自动化测试</li>
                        </ul>
                    </div>
                    <div style="padding: 15px; border: 2px solid #28a745; border-radius: 8px;">
                        <h4 style="margin-top: 0; color: #28a745;">✍️ 内容创作</h4>
                        <ul style="margin: 0; padding-left: 20px;">
                            <li>文章写作</li>
                            <li>图像生成</li>
                            <li>批量处理</li>
                        </ul>
                    </div>
                    <div style="padding: 15px; border: 2px solid #ffc107; border-radius: 8px;">
                        <h4 style="margin-top: 0; color: #ffc107;">🎓 研究学习</h4>
                        <ul style="margin: 0; padding-left: 20px;">
                            <li>模型对比</li>
                            <li>学术研究</li>
                            <li>知识问答</li>
                        </ul>
                    </div>
                </div>

                <h3 id="advantages">🎨 独特优势</h3>
                <ol style="line-height: 2;">
                    <li>🆓 <strong>零成本访问顶级模型</strong>：通过 LMArena 免费使用多种付费模型</li>
                    <li>🔌 <strong>统一接口标准</strong>：一套代码，访问所有模型</li>
                    <li>🔒 <strong>完全本地化</strong>：数据不经过第三方服务器</li>
                    <li>🔄 <strong>活跃维护</strong>：持续更新，快速响应新模型</li>
                </ol>
            </main>

            <section id="installation">
                <h2>🚀 免费AI模型API调用安装指南</h2>

                <h3 id="download">一、免费API调用工具下载</h3>
                <div class="note">
                    <strong>📥 免费下载地址</strong><br>
                    百度网盘: <code
                        style="background: rgba(255,255,255,0.2); padding: 5px 10px; border-radius: 3px;">https://pan.baidu.com/s/16lXXX2G7KKZeSn4Y_e1d8g?pwd=ntam</code><br><br>
                    <strong>⚠️ 环境要求</strong><br>
                    需要支持 Tampermonkey (油猴) 脚本的浏览器，如 Chrome、Firefox 或 Edge
                </div>

                <h3 id="env-setup">二、环境配置</h3>

                <h4>2.1 安装油猴插件</h4>
                <ol style="line-height: 2;">
                    <li>打开浏览器扩展管理页面</li>
                    <li>启用开发者模式</li>
                    <li>访问 <a href="https://www.tampermonkey.net/" target="_blank">Tampermonkey 官网</a> 安装插件</li>
                    <li>配置扩展权限（启用所有必要权限）</li>
                </ol>

                <h4>2.2 安装项目油猴脚本</h4>
                <ol style="line-height: 2;">
                    <li>点击浏览器工具栏 Tampermonkey 图标，选择"管理面板"</li>
                    <li>点击"添加新脚本"按钮</li>
                    <li>将项目目录中 <code class="highlight">LMArena\script\LMArena.js</code> 文件内容复制粘贴</li>
                    <li>按 <code class="highlight">Ctrl+S</code> 保存脚本</li>
                </ol>

                <h3 id="service">三、服务启动与使用</h3>

                <h4>3.1 准备 LMArena 页面</h4>
                <div class="warning">
                    ⚠️ 重要：启动本地服务前，请先：<br>
                    1. 访问 https://lmarena.ai/<br>
                    2. 进入 Direct Chat 模式<br>
                    3. 选择一个模型并进行一次对话测试
                </div>

                <h4>3.2 启动本地服务</h4>
                <ol style="line-height: 2;">
                    <li>双击 <code class="highlight">LMArena.exe</code> 启动本地服务</li>
                    <li>首次运行需输入授权码（联系作者获取）</li>
                    <li>点击"启动"按钮</li>
                    <li>看到 <strong>"油猴脚本已成功连接 WebSocket"</strong> 提示即成功</li>
                </ol>

                <div class="note">
                    <strong>📱 获取授权码</strong><br>
                    微信: tostring1<br>
                    QQ: 854569279<br>
                    <span style="color: rgba(255,255,255,0.8);">（授权成功后不要取消，一机一码）</span>
                </div>

                <h4>3.3 更新会话 ID</h4>
                <ol style="line-height: 2;">
                    <li>点击"更新会话 ID"按钮</li>
                    <li>切换到 LMArena 页面，点击"Retry"按钮</li>
                    <li>看到"会话更新成功"提示即完成</li>
                </ol>

                <h3 id="client-config">四、免费AI模型API客户端配置</h3>

                <h4>免费API接入Cherry Studio示例</h4>
                <div class="code-block-wrapper">
                    <button class="copy-button" onclick="copyCode(this)">复制</button>
                    <pre><code>API Base URL: http://127.0.0.1:61001
API Key: 123456</code></pre>
                </div>

                <h4>文生图功能配置</h4>
                <ol style="line-height: 2;">
                    <li>在 LMArena 页面切换到图像模型（如 SeeDream）</li>
                    <li>发送任意测试消息</li>
                    <li>点击"更新会话 ID"</li>
                    <li>返回 LMArena 页面点击"Retry"</li>
                </ol>

                <h3 id="api">五、免费模型API调用示例</h3>

                <h4>Python免费调用AI模型API代码</h4>
                <div class="code-block-wrapper">
                    <button class="copy-button" onclick="copyCode(this)">复制</button>
                    <pre><code class="language-python">import requests
import json

# 免费AI模型API配置（端口号：61001）
url = "http://127.0.0.1:61001/v1/chat/completions"  # 免费API调用地址
API_KEY = "123456"  # 免费使用，无需真实API Key

headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {API_KEY}"
}

payload = {
    "model": "claude-sonnet-4-20250514",
    "messages": [
        {
            "role": "user",
            "content": "你是哪个模型？"
        }
    ],
    "n": 1,
    "stream": False  # 可设置为 True 使用流式响应
}

# 发起请求
response = requests.post(url, headers=headers, json=payload, timeout=180)
print(response.json())</code></pre>
                </div>
            </section>

            <!-- FAQ 部分 -->
            <section id="faq">
                <h2>❓ 常见问题</h2>

                <div class="faq-item">
                    <div class="faq-question" onclick="toggleFAQ(this)">
                        <span><strong>Q: 为什么需要保持 LMArena 页面打开？</strong></span>
                        <span>▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>A: 油猴脚本需要在 LMArena 页面运行，以便与本地服务建立 WebSocket 连接。这是实现API桥接的核心机制。</p>
                    </div>
                </div>

                <div class="faq-item">
                    <div class="faq-question" onclick="toggleFAQ(this)">
                        <span><strong>Q: 可以同时使用多个模型吗？</strong></span>
                        <span>▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>A: 不可以。每次只能使用一个模型，切换模型需要更新会话 ID。这是 LMArena 平台的限制。</p>
                    </div>
                </div>

                <div class="faq-item">
                    <div class="faq-question" onclick="toggleFAQ(this)">
                        <span><strong>Q: API Key 可以自定义吗？</strong></span>
                        <span>▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>A: 可以。在 <code>config.jsonc</code> 文件中修改 <code>api_key</code> 字段即可。</p>
                    </div>
                </div>

                <div class="faq-item">
                    <div class="faq-question" onclick="toggleFAQ(this)">
                        <span><strong>Q: 支持哪些 AI 客户端？</strong></span>
                        <span>▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>A: 支持所有兼容 OpenAI API 格式的客户端，如 Cherry Studio、Cline、沉浸式翻译、ChatGPT Next Web 等。</p>
                    </div>
                </div>
            </section>

            <!-- 技术支持 -->
            <footer id="support">
                <h2>📞 免费AI模型API技术支持</h2>
                <div class="note">
                    <strong>免费模型API调用遇到问题？联系我们：</strong><br><br>
                    📱 微信: tostring1<br>
                    💬 QQ: 854569279<br>
                    🌐 官网: <a href="https://www.tostring.site/" style="color: white;" title="免费AI模型API调用技术支持">技术小馆</a>
                </div>
                <p style="text-align: center; margin-top: 20px; color: #666;">
                    © 2025 LMArena - 专业的免费AI模型API调用平台 | 140+免费模型API | Claude/GPT/Gemini免费调用
                </p>
            </footer>
        </main>
    </div>

    <!-- 图片查看器 -->
    <div class="image-viewer" id="imageViewer" onclick="closeImageViewer()">
        <img src="" alt="预览图片">
    </div>

    <!-- 回到顶部按钮 -->
    <button class="back-to-top" id="backToTop" onclick="scrollToTop()">↑</button>

    <script>
        // 页面滚动进度条
        window.addEventListener('scroll', () => {
            const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
            const scrollHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            const progress = (scrollTop / scrollHeight) * 100;
            document.getElementById('progressBar').style.width = progress + '%';

            // 显示/隐藏回到顶部按钮
            const backToTop = document.getElementById('backToTop');
            if (scrollTop > 300) {
                backToTop.classList.add('show');
            } else {
                backToTop.classList.remove('show');
            }

            // 更新目录活动状态
            updateTOCActive();
        });

        // 更新目录活动状态
        function updateTOCActive() {
            const sections = document.querySelectorAll('h2[id], h3[id]');
            const tocItems = document.querySelectorAll('.toc-item');

            let currentSection = null;
            sections.forEach(section => {
                const rect = section.getBoundingClientRect();
                if (rect.top <= 100 && rect.bottom > 0) {
                    currentSection = section.id;
                }
            });

            tocItems.forEach(item => {
                if (item.dataset.target === currentSection) {
                    item.classList.add('active');
                } else {
                    item.classList.remove('active');
                }
            });
        }

        // 目录点击跳转
        document.querySelectorAll('.toc-item').forEach(item => {
            item.addEventListener('click', () => {
                const target = document.getElementById(item.dataset.target);
                if (target) {
                    target.scrollIntoView({ behavior: 'smooth', block: 'start' });
                }
            });
        });

        // 切换模型分类展开/折叠
        function toggleCategory(header) {
            const category = header.parentElement;
            category.classList.toggle('expanded');
            category.classList.toggle('collapsed');
        }

        // 搜索模型
        function searchModels() {
            const searchTerm = document.getElementById('modelSearch').value.toLowerCase();
            const modelItems = document.querySelectorAll('.model-item');
            const categories = document.querySelectorAll('.model-category');

            modelItems.forEach(item => {
                if (item.textContent.toLowerCase().includes(searchTerm)) {
                    item.style.display = 'block';
                    // 展开包含匹配项的分类
                    const category = item.closest('.model-category');
                    if (category && searchTerm) {
                        category.classList.add('expanded');
                        category.classList.remove('collapsed');
                    }
                } else {
                    item.style.display = searchTerm ? 'none' : 'block';
                }
            });

            // 如果没有搜索词，恢复默认状态
            if (!searchTerm) {
                categories.forEach((category, index) => {
                    if (index === 0) {
                        category.classList.add('expanded');
                        category.classList.remove('collapsed');
                    } else {
                        category.classList.remove('expanded');
                        category.classList.add('collapsed');
                    }
                });
            }
        }

        // 复制代码
        function copyCode(button) {
            const codeBlock = button.nextElementSibling.querySelector('code');
            const text = codeBlock.textContent;

            navigator.clipboard.writeText(text).then(() => {
                button.textContent = '已复制';
                button.classList.add('copied');
                setTimeout(() => {
                    button.textContent = '复制';
                    button.classList.remove('copied');
                }, 2000);
            });
        }

        // 打开图片查看器
        function openImageViewer(img) {
            const viewer = document.getElementById('imageViewer');
            const viewerImg = viewer.querySelector('img');
            viewerImg.src = img.src;
            viewer.classList.add('active');
        }

        // 关闭图片查看器
        function closeImageViewer() {
            const viewer = document.getElementById('imageViewer');
            viewer.classList.remove('active');
        }

        // 切换FAQ
        function toggleFAQ(question) {
            const faqItem = question.parentElement;
            faqItem.classList.toggle('active');
            const icon = question.querySelector('span:last-child');
            icon.textContent = faqItem.classList.contains('active') ? '▲' : '▼';
        }

        // 回到顶部
        function scrollToTop() {
            window.scrollTo({ top: 0, behavior: 'smooth' });
        }

        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', () => {
            // 设置初始状态
            const categories = document.querySelectorAll('.model-category');
            categories.forEach((category, index) => {
                if (index === 0) {
                    category.classList.add('expanded');
                } else {
                    category.classList.add('collapsed');
                }
            });
        });
    </script>
</body>

</html>